import request from "@/utils/request";

/**
 * 薪资列表
 * @param {*} data
 * @returns
 */
export function API_salaryList(params) {
  return request({
    url: "/salary/list",
    method: "get",
    params,
  });
}

/**
 * 薪资新增
 * @returns
 */
export function API_salaryCreate(data) {
  return request({
    url: "/salary/create",
    method: "post",
    data,
  });
}

/**
 * 薪资修改
 * @returns
 */
export function API_salaryEdit(data) {
  return request({
    url: `/salary/edit/${data.code}`,
    method: "put",
    data,
  });
}

/**
 * 薪资删除
 * @returns
 */
export function API_salaryDelete(data) {
  return request({
    url: `/salary/delete/${data.code}`,
    method: "delete",
  });
}

/**
 * 薪资记录
 * @returns
 */
export function API_salaryGet(params) {
  return request({
    url: "/salary/get",
    method: "get",
    params,
  });
}
